unit SmallStruct.Configuration.TSSBusinessObjectConfiguration;

interface

uses
  Classes,
  SmallStruct.Configuration.TSSConfiguration,
  SmallStruct.Configuration;

type
  TSSBusinessObjectConfiguration = class(TSSConfiguration, ISSBusinessObjectConfiguration)
  private
    _BusinessObjectName, _DatabaseConnectionName: string;
    _ReferenceBusinessObjectName: TStringList;
    _IsRequireDatabase, _IsBaseScript: Boolean;
  public
    function GetBusinessObjectName: string;
    function GetDatabaseConnectionName: string;
    function GetReferenceBusinessObjectName: TStrings;
    function IsRequireDatabase: Boolean;
    function IsBaseScript: Boolean;
  public
    procedure SetBusinessObjectName(const ABusinessObjectName: string);
    procedure SetDatabaseConnectionName(const ADatabaseConnectionName: string);
    procedure SetRequireDatabase(const AIsRequireDatabase: Boolean);
    procedure SetBaseScript(const AIsBaseScript: Boolean);
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  end;

implementation

{ TSSBusinessObjectConfiguration }

constructor TSSBusinessObjectConfiguration.Create(AOwner: TComponent);
begin
  inherited;
  _ReferenceBusinessObjectName := TStringList.Create;
end;

function TSSBusinessObjectConfiguration.GetReferenceBusinessObjectName: TStrings;
begin
  Result := _ReferenceBusinessObjectName;
end;

function TSSBusinessObjectConfiguration.IsBaseScript: Boolean;
begin
  Result := _IsBaseScript;
end;

function TSSBusinessObjectConfiguration.IsRequireDatabase: Boolean;
begin
  Result := _IsRequireDatabase;
end;

function TSSBusinessObjectConfiguration.GetBusinessObjectName: string;
begin
  Result := _BusinessObjectName;
end;

function TSSBusinessObjectConfiguration.GetDatabaseConnectionName: string;
begin
  Result := _DatabaseConnectionName;
end;

destructor TSSBusinessObjectConfiguration.Destroy;
begin
  _ReferenceBusinessObjectName.Free;
  inherited;
end;

procedure TSSBusinessObjectConfiguration.SetBaseScript(const AIsBaseScript: Boolean);
begin
  _IsBaseScript := AIsBaseScript;
end;

procedure TSSBusinessObjectConfiguration.SetBusinessObjectName(const ABusinessObjectName: string);
begin
  _BusinessObjectName := ABusinessObjectName;
end;

procedure TSSBusinessObjectConfiguration.SetDatabaseConnectionName(const ADatabaseConnectionName: string);
begin
  _DatabaseConnectionName := ADatabaseConnectionName;
end;

procedure TSSBusinessObjectConfiguration.SetRequireDatabase(const AIsRequireDatabase: Boolean);
begin
  _IsRequireDatabase := AIsRequireDatabase;
end;

end.
